//
//  MCBasePWFModel.m
//  TLYL
//
//  Created by miaocai on 2017/6/14.
//  Copyright © 2017年 TLYL01. All rights reserved.
//

#import "MCBasePWFModel.h"

@implementation MCItemModel
@end
@implementation MCBaseSelectedModel
@end

@implementation MCBasePWFModel

- (CGFloat)lineH{
    // 一行球个数
    CGFloat lineCount = 5;
    NSString *str = @"百位:";
    CGFloat labelh = ceilf([str boundingRectWithSize:CGSizeMake(G_SCREENWIDTH, 1000) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:16.f ]} context:nil].size.height);
    //间隙
    CGFloat padding = MC_REALVALUE(20);
    //
    CGFloat w = ceilf((G_SCREENWIDTH - labelh - lineCount * padding) /6);
    CGFloat bw = ceilf((G_SCREENWIDTH - labelh - 3 * padding - lineCount * MC_REALVALUE(15)) /lineCount);
    CGFloat h = ceilf([self.ballCount floatValue]/lineCount);
    if ([self.filterCriteria  isEqualToString: @"0"]) {
         return w + MC_REALVALUE(20) + 2* padding + h *bw  + h * MC_REALVALUE(15);
    } else if([self.filterCriteria  isEqualToString: @"1"]){
         return w + MC_REALVALUE(10) + w + 2* padding + h *bw + MC_REALVALUE(30) + h * MC_REALVALUE(15);
    }else{
        return G_SCREENHEIGHT - MC_REALVALUE(114);
    }
    
}

+ (NSDictionary *)objectClassInArray
{
    
    return @{@"item" : [MCItemModel class],
             @"baseSelectedModel":[MCBaseSelectedModel class]
             };
    
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}


- (id)valueForUndefinedKey:(NSString *)key{
    return @"";
}


@end









